Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add create-admin action #13

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

feat: add create-admin action #13

wants to merge 8 commits into from

Conversation

amandahla
Copy link
Contributor

@amandahla amandahla commented Sep 24, 2024

Applicable spec:

Overview

This PR adds a action create-admin to the Maubot charm.

Adding a user to Maubot means adding a new item to the "admins" in the configuration file.
Then the charm needs to restart Maubot for the changes to take effect.

  • Action outputs a password.
  • Action fails if name is "root" (reserved).

Rationale

Create admin Maubot user.

Juju Events Changes

Add new action create-admin.

Module Changes

Library Changes

Checklist

No CH available.

src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
src/charm.py Show resolved Hide resolved
tests/integration/test_charm.py Show resolved Hide resolved
Copy link

github-actions bot commented Oct 1, 2024

Test coverage for a138fff

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py      98      8     14      3    90%   111, 115, 146-147, 151-152, 166, 188
----------------------------------------------------------
TOTAL             98      8     14      3    90%

Static code analysis report

Run started:2024-10-01 13:40:00.617132

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 410
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants